<template>
	<tm-app ref="app">
		<!--<tm-navbar title="榜样的力量" color="orange" hideBack="true" hideHome="true"></tm-navbar>-->
		<tm-navbar :title="title" color="orange" linear="right" linearDeep="accent"></tm-navbar>
		<view class="pa-32">
			<tm-html :content="contnt"></tm-html>
		</view>
		
		
		<view class="mb-32 mx-32 round-3 overflow">
			<tm-cell :margin="[0, 0]" :titleFontSize="30" title=" ">
				<template v-slot:right><tm-text label=" "></tm-text></template>
			</tm-cell>
			<tm-cell :margin="[0, 0]" :titleFontSize="30" title=" ">
				<template v-slot:right><tm-text label=" "></tm-text></template>
			</tm-cell>
			<tm-cell :margin="[0, 0]" :titleFontSize="30" title=" ">
				<template v-slot:right><tm-text label=" "></tm-text></template>
			</tm-cell>
		</view>
		
	</tm-app>
</template>

<script lang="ts" setup>
	import { ref } from "vue"
	import { onLoad } from "@dcloudio/uni-app"
	import { readNews } from "@/api/news"

	const contnt = ref("");
	const id = ref("");
	const title = ref("");
	
	
	onLoad((e) => {
		id.value = e.id
		loadNewDetail();
	})
	
	const loadNewDetail = async() => {
		let param = {"id":id.value};
		const result = await readNews(param);
		// console.log(JSON.stringify(result));
		contnt.value = result.content;
		title.value = result.title;
	}
</script>